package com.company;

public class Triangles {

    public static void main(String[] args) {

        Triangles t = new Triangles();

        t.print();
    }

    private void print()
    {
        System.out.println(exerciseOne());
        System.out.println(exerciseTwo(7));
        System.out.println(exerciseThree(4));
        System.out.println(exerciseFour(6));
    }

    public String exerciseOne()
    {
        return "*";
    }

    public String exerciseTwo( int num )
    {
        String output = "";
        for(int i = 0; i < num; i++)
        {
            output += "*";
        }
        return output;
    }

    public String exerciseThree( int num )
    {
        String output = "";
        for( int i = 0; i < num; i++)
        {
            output += "*\n";
        }
        return output;
    }

    public String exerciseFour( int num )
    {
        String output = "";
        for( int i = 1; i <= num; i++)
        {
            for( int j = 0; j < i; j++)
            {
                output += "*";
            }

            output += "\n";
        }
        return output;
    }
}
